package cn.sofwin.day0129.homework.age;

import java.util.Scanner;

public class AgeTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        Age age = new Age();

        System.out.println("输入年龄：");

        try {
            age.setAge(sc.nextInt());
            System.out.println("年龄正确。");
        } catch (IllegalArgumentException e) {
            e.printStackTrace();
        }
    }
}
